package com.usercar.controller;


import com.dk.bean.Result;
import com.dk.em.ResultEnum;
import com.usercar.pojo.ContentPay;
import com.usercar.service.IContentPayService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2021-08-11
 */
@Controller
@RequestMapping("/contentPay")
@Api("广告支付订单接口")
public class ContentPayController {

    @Autowired
    private IContentPayService iContentPayService;

    @ApiOperation(value = "订单增加")
    @PostMapping
    public Result insertInfo(@RequestBody ContentPay contentPay){
        int i =  iContentPayService.insertInfo(contentPay);
        if(i>0){
            return Result.buildResult(ResultEnum.SUCCESS);
        }else {
            return Result.buildResult(ResultEnum.ERROR);
        }
    }
}

